package com.siyao.redvip.components.view;

import com.siyao.redvip.R;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * 
 * @author lenovo
 *
 */
public class CustomProgressDialog extends Dialog {
	public CustomProgressDialog(Context context) {
		super(context, R.style.dialog_activity);
		
		View dialogView = getLayoutInflater().inflate(R.layout.progress_dialog,
				null);
		ImageView ivLoading = (ImageView) dialogView.findViewById(R.id.loadingIv);
		TextView	mLoadingTv = (TextView) dialogView.findViewById(R.id.loadingTv);
		ivLoading.setImageResource(R.drawable.c_loading_bg);
		mLoadingTv.setText("拼命加载中");
		setContentView(dialogView);
		AnimationDrawable animationDrawable = (AnimationDrawable) ivLoading
				.getDrawable();
		animationDrawable.start();
	}
}
